package org.rcloud.io.service;

import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageInfo;
import org.rcloud.io.Utils.LikeVo;
import org.rcloud.io.Utils.PageVo;
import org.rcloud.io.Utils.ResultVo;
import org.rcloud.io.model.Article;

import java.util.Map;

/**
 * Created by Administrator on 2019/2/26.
 */
public interface ArticleService {

    ResultVo save(Article article);

    ResultVo findTitle(String nameTitle);

    PageVo<Article> findRuralNoBinding(Integer rId);

    PageVo<Article> findRuralYesBinding(Integer rId);

    PageVo<Article> findSpecialtyNoBinding(Integer bId);

    PageVo<Article> findSpecialtyYesBinding(Integer bId);

    PageInfo<Article> selectAll(int pageNum, int pageSize, Map map);

    ResultVo selectLikeSum(Integer pageNum,Integer pageSize, Integer categoryId);

//    分页
//    PageInfo<Article> selectVoteNum(int pageNum, int pageSize, Map map);

    PageVo<Article> selectVoteNum(JSONObject record);

    ResultVo selectByCategoryId(Integer pageNum,Integer pageSize, Integer categoryId);

    ResultVo selectByUserId(Integer pageNum,Integer pageSize, Integer id);

    ResultVo selectAllByArticleId(Integer articleId);

    ResultVo selectAllByOpenId(String openId);
}
